#/usr/local/bin/python3.7
#coding=utf-8
import unittest

from case.platform.case_taishan import *



class TestHmUi(unittest.TestCase):

    """ Test mathfunc.py """


    def test_0login(self):

        """
            测试泰山登录
        """

        self.assertEqual("privateTesting",login_taishan(url="http://taishan.huimei.com"),msg=["登录不成功"])



    def test_1taishan_title(self):

        """
            验证泰山的title
        """

        self.assertEqual("http://taishan.huimei.com/images/logo_top.jpg",taishan_title())


    def test_2taishan_sug(self):

        """
            验证泰山搜索框旁边sug层的内容
        """

        self.assertEqual(5,taishan_sug())


    def test_3taishan_search(self):

        """
            搜索肺炎
        """

        self.assertEqual("肺炎",taishan_search())


    def test_4taishan_linchuang_app(self):

        """
            验证临床应用中的图标
        """

        self.assertEqual("true",linchuang_app())


    def test_5taishan_doc_jump(self):

        """
            验证泰山中文献的跳转
        """

        self.assertEqual("true",doc_jump())


    def test_6taishan_ame_drup(self):

        """
            验证泰山中ame的跳转
        """

        self.assertEqual("true",ame_jump())



    def test_7taishan_hospital_manage(self):

        """
            验证taishan中医院管理的图标
        """

        self.assertEqual("true",hospital_manage())


    def test_8taishan_tesla_jump(self):

        """
            验证tesla跳转
        """

        self.assertEqual("true",tesla_jump())


    def test_9taishan_fuxi_jump(self):

        """
            验证fuxi跳转
        """

        self.assertEqual("true",fuxi_jump())



    def test_9taishan_se_jump(self):

        """
            验证admin-se跳转
        """

        self.assertEqual("true",se_jump())



    def test_9taishan_knowlage_jump(self):

        """
            验证医院知识库跳转
        """

        self.assertEqual("true",knowlage_jump())



    def test_9taishan_songshan_jump(self):

        """
            验证嵩山跳转
        """

        self.assertEqual("true",songshan_jump())



    def test_9taishan_lvdao_jump(self):

        """
            验证专病数据平台跳转
        """

        self.assertEqual("true",lvdao_jump())



    def test_9taishan_zhuangzhou_jump(self):

        """
            验证庄周跳转
        """

        self.assertEqual("true",zhuangzhou_jump())







    # def test_minus(self):
    #     """Test method minus(a, b)"""
    #     self.assertEqual(1, minus(3, 2))
    #
    # def test_multi(self):
    #     """Test method multi(a, b)"""
    #     self.assertEqual(6, multi(2, 3))
    #
    # def test_divide(self):
    #     """Test method divide(a, b)"""
    #     self.assertEqual(2, divide(6, 3))
    #     self.assertEqual(2.5, divide(5, 2))

# def run():
#
#     suite = unittest.TestLoader().loadTestsFromTestCase(TestHmUi)  #定义一个测试集合
#
#     run = bf(suite) #实例化BeautifulReport模块
#     run.report(filename='./test',description='这个描述参数是必填的')
#
#     # test_suit = unittest.TestSuite()
#
#     # test_suit = unittest.TestLoader().loadTestsFromTestCase(TestHmUi)
#     #
#     # run = bf(test_suit)
#     #
#     # run.report(filename=u"./report/UI报告_" + time.strftime("%Y-%m-%d_%H_%M_%S"), description=u"UI报告")
#
#
#
# if __name__ == "__main__":
#
#     run()
#     logprint = log.Log()
#     logprint.logOutput()
#     test_suite = unittest.defaultTestLoader.discover('', pattern='maincase.py')
#     # test_suite = unittest.TestLoader().loadTestsFromTestCase(TestHmUi)
#     result = BeautifulReport(test_suite)
#     now = time.strftime("%Y%m%d%H%M%S")
#     test_dir = '../TestReport/'
#     report_dir = '../TestReport/'
#     test_report = result.report(filename=now,description='', report_dir=report_dir, theme='theme_memories')
#     report = NewReport(test_dir)